package com.lw.demo;


import com.sun.org.apache.xpath.internal.operations.Variable;

/**
 * @author LW
 * @2021/9/7 9:55
 */
public class Test {
    public static void main(String[] args) {
        long start=System.currentTimeMillis();   //获取开始时间
        int count = 0;
        for (int i = 1; i <= 100000000; i++) {
            count += i;
        }
        System.out.println(count);
        long end=System.currentTimeMillis(); //获取结束时间
        System.out.println("程序运行时间： "+(end-start)+"ms");//39ms
    }
}
